package com.lanswon.icc.common.rpc.feign.fallbackImpl;

import com.lanswon.icc.common.core.dto.UserInfo;
import com.lanswon.icc.common.core.vo.Result;
import com.lanswon.icc.common.rpc.feign.AdminServiceFeign;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author zsw
 * @Date 2019/11/8 9:37
 * @Version V1.0
 **/

@Component
@Slf4j
public class AdminServiceFeignFallbackImpl implements AdminServiceFeign {

    @Setter
    private Throwable cause;

    @Setter
    private Result result ;

    @Override
    public Result findByUsername(String username, String from) {
        log.error("feign 查询用户信息失败:{}", username, cause);
        return result;
    }

    @Override
    public Result<UserInfo> findByMobile(String mobile, String from) {
        log.error("feign 查询用户手机失败:{}", mobile, cause);
        return null;
    }

//    @Override
//    public Result<String> saveSysLog(SysLog sysLog) {
//        log.error("feign 插入日志失败", cause);
////        cause.printStackTrace();
//        return result;
//    }
}